package com.lyf.auth.utils;

import java.util.HashSet;
import java.util.Set;
import org.springframework.stereotype.Component;

@Component
public class Utils {
   public Set<String> stringToSet(String input) {
      Set<String> output = new HashSet();
      if (input != null && !input.isEmpty()) {
         String[] strings = input.split("\\|");

         for(int i = 0; i < strings.length; ++i) {
            output.add(strings[i]);
         }

         return output;
      } else {
         return output;
      }
   }
}
